package com.xtpt.disaster.service.impl;

import com.xtpt.disaster.bean.DbnodeInfo;
import com.xtpt.disaster.mapper.DbnodeInfoMapper;
import com.xtpt.disaster.service.DBNodeInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DbNodeInfoServiceImpl implements DBNodeInfoService {
    @Autowired
    DbnodeInfoMapper dbNodeInfoMapper;

    @Override
    public DbnodeInfo selectByPrimaryKey(Long id) {
        return dbNodeInfoMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<DbnodeInfo> selectAllNode() {
        return dbNodeInfoMapper.selectAllNode();
    }

    @Override
    public int insert(DbnodeInfo dbnodeInfo) {
        return dbNodeInfoMapper.insert(dbnodeInfo);
    }

    @Override
    public int deleteById(Long id) {
        return dbNodeInfoMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int updateById(DbnodeInfo dbnodeInfo) {
        return dbNodeInfoMapper.updateByPrimaryKeySelective(dbnodeInfo);
    }

    @Override
    public int batchDelete(long[] ids) {
        return dbNodeInfoMapper.batchDelete(ids);
    }
}
